let onOff = 1; //开关
document.querySelector(".Giao").onclick = function () {
  // 判断点击按钮等于1的时候显示样式,并返回值为0 ，为0的时候点击按钮样式隐藏
  if (onOff == 1) {
    document.querySelector(".nameZ").style.display = "block";
    onOff = 0;
    return;
  } else {
    document.querySelector(".nameZ").style.display = "none";
    onOff = 1;
    return;
  }
};

let ct = document.querySelector(".ct");
let cct = document.querySelector(".cct");
ct.addEventListener("click", function () {
  if (onOff == 1) {
    cct.innerHTML = `
    <div>成涛</div>
    `;
    onOff = 0;
    return;
  } else {
    cct.innerHTML = "";
    onOff = 1;
    return;
  }
});

let why = document.querySelector(".why");
why.addEventListener("click", function () {
  if (onOff == 1) {
    why.innerHTML = ` <div class='yy'>吴海颖</div>`;
    onOff = 0;
    return;
  } else {
    why.innerHTML = "<button>wu按钮</button>";
    onOff = 1;
    return;
  }
});

document.querySelector(".zgw1").addEventListener("click", () => {
  if (onOff == 1) {
    document.querySelector(".zgw2").style.display = "block";
    onOff = 0;
    return;
  } else {
    document.querySelector(".zgw2").style.display = "none";
    onOff = 1;
    return;
  }
});

let ygq = document.querySelector(".ygq");

ygq.addEventListener("click", function () {
  if (onOff == 1) {
    ygq.innerHTML = ` <div class="qwe">杨广钦</div>`;
    onOff = 0;
    return;
  } else {
    ygq.innerHTML = "<button>点击按钮</button>";
    onOff = 1;
    return;
  }
});
